package com.heima.test.job;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class HelloJob {
    @Value("${xxl.job.executor.port}")
    int port;
    @XxlJob("helloJob")
    public ReturnT hello(String params){
        System.out.println("xxljob任务触发       执行端口======>"+port +"触发时间"+ LocalDateTime.now().toString());
        return ReturnT.SUCCESS;
    }
}
